﻿Public Class GenericPerson
    Private m_sFirstName As String = "<First Name>"
    Private m_sLastName As String = "<Last Name>"
    Private m_sInitial As String = ""
    Private m_iAge As Integer = -1
    Private m_cContact As New ContactInformation
    Private m_sGender As String = "<Gender>"
    Private m_bImage As Bitmap = Nothing
    Private m_lID As Long = 0
    Private m_sFilename As String
    Overridable ReadOnly Property IsChild() As Boolean
        Get
            Return False
        End Get
    End Property
    Property FirstName() As String
        Get
            Return Me.m_sFirstName
        End Get
        Set(ByVal value As String)
            Try
                Me.m_sFirstName = value
            Catch ex As Exception
            End Try
        End Set
    End Property
    Property LastName() As String
        Get
            Return Me.m_sLastName
        End Get
        Set(ByVal value As String)
            Try
                Me.m_sLastName = value
            Catch ex As Exception
            End Try
        End Set
    End Property
    Property Initial() As String
        Get
            Return Me.m_sInitial
        End Get
        Set(ByVal value As String)
            Me.m_sInitial = value
        End Set
    End Property
    Property Age() As Integer
        Get
            Return Me.m_iAge
        End Get
        Set(ByVal value As Integer)
            Try
                Me.m_iAge = value
            Catch ex As Exception
            End Try
        End Set
    End Property
    Property Gender() As String
        Get
            Return Me.m_sGender
        End Get
        Set(ByVal value As String)
            Try
                Me.m_sGender = value
            Catch ex As Exception
            End Try
        End Set
    End Property
    Property Photo() As Bitmap
        Get
            Return GetImage(Me.ID)
        End Get
        Set(ByVal value As Bitmap)
            Try
                AddImage(Me.ID, value)
            Catch ex As Exception
                MsgBox(ex.Message & "@line:" & ex.Source)
            End Try
        End Set
    End Property
    Property ID() As Long
        Get
            Return Me.m_lID
        End Get
        Set(ByVal value As Long)
            Try
                Me.m_lID = value
            Catch ex As Exception
            End Try
        End Set
    End Property
    Property ContactInformation() As ContactInformation
        Get
            Return Me.m_cContact
        End Get
        Set(ByVal value As ContactInformation)
            Me.m_cContact = TryCast(value, ContactInformation)
        End Set
    End Property
    Property SaveFile() As String
        Get
            Return Me.m_sFileName
        End Get
        Set(ByVal value As String)
            Me.m_sFileName = value
        End Set
    End Property
End Class
